 package com.hp.bon.sgw.wkflow.impl;
 
 import com.hp.bon.sgw.wkflow.FlowVarObj;
 import org.dom4j.Element;
 import org.dom4j.Node;
/**
 * 提供 用户输入的参数（XML)的数据字段解析
 * @author wuzhih
 *
 */
public class FlowInputDataVarObj extends FlowVarObj {

	private final Element reqData;
	public FlowInputDataVarObj(Element reqData)
	{
		this.reqData=reqData;
	}
	@Override
	public Object getProperty(String express) {
		Node node = reqData.selectSingleNode(express);
		if(node==null)
		{
			throw new IllegalArgumentException("no such property:" + express);
    }
 
     return node.getStringValue();
   }
 }
